package cn.abellflower.flower.home.serice.feign.controller;

import cn.abellflower.flower.home.serice.feign.clients.SchedulerServiceHome;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 *
 * @author gbzdyf@126.com
 * @create 2018-07-19 20:26
 **/
@RestController
public class HomeController {

    /**
     * 编译器报错，无视。 因为这个Bean是在程序启动的时候注入的，编译器感知不到，所以报错。
     */
    @Autowired
    SchedulerServiceHome schedulerServiceHome;

    @GetMapping(value = "/index")
    public String sayHi(@RequestParam String name) {
        return schedulerServiceHome.index(name);
    }
}
